package Stream;

import java.util.Optional;

public class StudentStream {
    public static void main(String[] args) {
        Student.stream() // 生流
                .limit(4)
                .filter(Optional::isPresent)
                .map(Optional::get)
                .filter(student -> student.getAge() > 18)
                .forEach(System.out::println);
    }


}
